
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

/**
 * @summary Hover and click animations for help icon
 *
 * @variant
 * @name global-action-help
 * @selector .slds-icon-help
 * @restrict button, a
 * @support prototype
 */
.slds-icon-help {
  width: $global-action-icon-size;
  height: $global-action-icon-size;
  fill: var(--slds-g-color-neutral-base-70, #{$fill-header-button});

  &:hover .slds-icon-help_hover {
    opacity: 1;
    transform: scale(1);
  }

  &:focus {
    animation: slds-click-global-action 80ms cubic-bezier(1, 1.9, 0.94, 0.98);

    .slds-icon-help_focus {
      opacity: 1;
      transform: scale(1);
    }
  }

  mask {
    mask-type: alpha;
  }
}

/**
 * @summary Modifies hover effect of global help icon
 * @selector .slds-icon-help_hover
 * @restrict .slds-icon-help circle
 */
.slds-icon-help_hover {
  opacity: 0;
  transform: scale(0.1, 0.1);
  transform-origin: 45px 47px;
  transition: all 200ms ease-out; // stylelint-disable declaration-property-value-disallowed-list
  fill: var(--slds-g-link-color-hover, #{$fill-header-button-hover});
}

/**
 * @summary Modifies focus effect of global help icon
 * @selector .slds-icon-help_focus
 * @restrict .slds-icon-help circle
 */
.slds-icon-help_focus {
  opacity: 0;
  transform: scale(0.1, 0.1);
  transform-origin: 45px 47px;
  transition: all 200ms ease-out;
  fill: var(--slds-g-color-brand-base-50, #{$fill-header-button-focus});
}

.slds-icon-help svg {
  width: $global-action-icon-size;
  height: $global-action-icon-size;
}

.slds-icon-help g {
  mask: url(#questionMark);
}

@keyframes slds-click-global-action {

  25% {
    transform: scale(0.95, 0.95);
  }

  100% {
    transform: scale(0.98, 0.98);
  }
}
